/**
 * Selling Partner API for Messaging
 * With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
 *
 * The version of the OpenAPI document: v1
 *
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 *
 */

import { ApiClient } from '../ApiClient.js'

/**
 * The CreateConfirmServiceDetailsRequest model module.
 * @module messaging_v1/model/CreateConfirmServiceDetailsRequest
 * @version v1
 */
export class CreateConfirmServiceDetailsRequest {
  /**
   * Constructs a new <code>CreateConfirmServiceDetailsRequest</code>.
   * The request schema for the createConfirmServiceDetails operation.
   * @alias module:messaging_v1/model/CreateConfirmServiceDetailsRequest
   * @class
   */
  constructor () {
  }

  /**
   * Constructs a <code>CreateConfirmServiceDetailsRequest</code> from a plain JavaScript object, optionally creating a new instance.
   * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
   * @param {Object} data The plain JavaScript object bearing properties of interest.
   * @param {CreateConfirmServiceDetailsRequest} obj Optional instance to populate.
   * @return {CreateConfirmServiceDetailsRequest} The populated <code>CreateConfirmServiceDetailsRequest</code> instance.
   */
  static constructFromObject (data, obj) {
    if (data) {
      switch (typeof data) {
        case 'string':
          obj = String(data)
          break
        case 'number':
          obj = Number(data)
          break
        case 'boolean':
          obj = Boolean(data)
          break
      }
      obj = obj || new CreateConfirmServiceDetailsRequest()
      if (data.hasOwnProperty('text')) { obj.text = ApiClient.convertToType(data.text, 'String') }
    }
    return obj
  }
}

/**
 * The text to be sent to the buyer. Only links related to Home Service calls are allowed. Do not include HTML or email addresses. The text must be written in the buyer's language of preference, which can be retrieved from the GetAttributes operation.
 * @member {String} text
 * @type {String}
 */
CreateConfirmServiceDetailsRequest.prototype.text = undefined
